<script type="text/javascript">
<{include file='product/product/js/index.js'}>
</script> 
<style type="text/css">
.button{background:url(images/left-menu-li.gif) repeat-x left top #F1F6F9; border:1px solid #318DAC; font-weight:bold; padding:2px 5px; font-weight:lighter; color:#318DAC; vertical-align:middle; -moz-border-radius:3px; -webkit-border-radius:3px; margin:auto 5px}
.center{text-align:center;}
.product_op{height:30px;}
.product_op span{cursor:pointer;}
.packageTips,.validateTips,.batchAddTips{color:red;line-height:25px;}
.height25 td{padding: 2px 5px;}
</style>

<div id="right_confirm" style="display: none;">
	<p style="text-align:center;font-size: 14px;color: red;font-weight: bold;">
	<{$lang.delete_sure}>？
	</p>
</div>

<div id="alert_msg" style="display: none;" title="<{$lang.tip}><{$lang.msg}>">
	<p style="font-size: 14px;">
	
	</p>
</div>
<div id="printDialog" style="display:none" title="Print"> </div>
<div id="printShelfProudctDialog" style="display:none" title="Print"> </div>
<div id="iTitle">
	<div id="iTitleSub">
	
		<form id="sForm" name="sForm">
		<div>
		<label>
			<{$lang.product}><{$lang.sku}>:<input id="sproduct_sku" class="myInput" type="text" name="sproduct_sku">
		</label>&nbsp;

		<label>
			<{$lang.customer_code}>:<input id="customer_id" class="myInput" type="text" name="customer_id">
		</label>&nbsp;
        <input class="button" type="button" value="<{$lang.search}>" onclick="search();">&nbsp;&nbsp;
		<input class="button" type="button" value="<{$lang.add}>"  id="addButton" onclick="editProduct('')">&nbsp;&nbsp;
		<input class="button" type="button" value="<{$lang.batch}><{$lang.add}>"  id="batchAddButton" onclick="batchAddProduct()">&nbsp;&nbsp;
		</div>
		</form>
		
	</div>
	<div id="message" style="color:red;"></div>
	<div class="myClear"></div>
</div><!-- id="iTitle" 结束 -->

<h3><{$lang.product}><{$lang.list}>
</h3>
<div class="width100 center product_op">
	<span class="button activate bold" onclick='updateProductStatus("1","<{$lang.activate}>");'><{$lang.activate}></span>
	<span class="button inactivate bold" onclick='updateProductStatus("2","<{$lang.draft}>");'><{$lang.inactivate}></span>
	<span class="button delete bold" onclick='updateProductStatus("0","<{$lang.delete}>");'><{$lang.delete}></span>
	<span class="button print bold" onclick='printProduct("3x2");'><{$lang.print}><{$lang.label}>3x2</span>
	<span class="button print bold" onclick='printProduct("5x2");'><{$lang.print}><{$lang.label}>5x2</span>
    <span class="button print bold" onclick='PrintShelfProduct("5x2");'><{$lang.ws_code}><{$lang.print}><{$lang.label}>5x2</span>
</div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="myTab">	
	<thead><tr>
    	<th><input type="checkbox" class="checkAll"></th>
    	<th><{$lang.No}></th>
    	<th><{$lang.product}><{$lang.sku}></th>
   		<th><{$lang.customer_code}></th>
    	<th width="15%"><{$lang.product}><{$lang.name}></th>
        <th><{$lang.category}></th>
        
        <th><{$lang.length}>/<{$lang.width}>/<{$lang.height}>(cm)</th>
        <th><{$lang.weight}></th>
        <th><{$lang.price}></th>
        <th><{$lang.package}></th>
        <th><{$lang.add}><{$lang.date}></th>
        <th><{$lang.status}></th>
        
        <th><{$lang.operation}></th>
	</tr></thead>
    
	<tbody id="list"></tbody>
	
</table>

<div class="pagination"></div>

<style type="text/css">
div#add{
	text-align:center;
}
div.info{
	text-align:left;
}
div.item{
	margin-bottom: 12px;
}
input.text {
    height: 22px;    
    margin-left: 8px;
}
span.text{
	margin-left: 8px;
}
span.userInfoLeft{
	display:block;
	float:left;
	width:100px;
}
.myTab table td {
    border: 0 none;
    text-align: left;
}
</style>

<div id="add" title="<{$lang.product}><{$lang.msg}><{$lang.edit}>" style="display:none;"> 
	<div class="info">
		<div class="validateTips" id="tips"></div>
		
		<form id="createForm" name="createForm" >
		<div id="product_option">				
			
			
		</div>
		<div class="item">
			<span class="userInfoLeft"><{$lang.product}><{$lang.name}>:</span>
			<span class="userInfoRight">
				<input type="hidden" name="product_id" id="product_id" />
				<input type="text" name="product_name" id="product_name" class="text ui-widget-content ui-corner-all"/>
			</span>
			<div style="clear:both;"></div>
		</div>		
		
		<div class="item">
			<span class="userInfoLeft"><{$lang.sku}>:</span>
			<span class="userInfoRight">
				<input type="text" name="product_sku" readonly="true" id="product_sku" class="text ui-widget-content ui-corner-all" style='background:#ddd;'/>
			</span>
			<div style="clear:both;"></div>
		</div>		
		
		<div class="item">
			<span class="userInfoLeft"><{$lang.length}>:</span>
			<span class="userInfoRight">
				<input type="text" name="product_length" id="product_length" class="text ui-widget-content ui-corner-all"/>cm
			</span>
			<div style="clear: both;"></div>
		</div>		
		<div class="item">
			<span class="userInfoLeft"><{$lang.width}>:</span>
			<span class="userInfoRight">
				<input type="text" name="product_width" id="product_width" class="text ui-widget-content ui-corner-all"/>cm
			</span>
			<div style="clear: both;"></div>
		</div>
		<div class="item">
			<span class="userInfoLeft"><{$lang.height}>:</span>
			<span class="userInfoRight">
				<input type="text" name="product_height" id="product_height" class="text ui-widget-content ui-corner-all"/>cm
			</span>
			<div style="clear: both;"></div>
		</div>
		<div class="item">
			<span class="userInfoLeft"><{$lang.weight}>:</span>
			<span class="userInfoRight">
				<input type="text" name="product_weight" id="product_weight" class="text ui-widget-content ui-corner-all"/>kg
			</span>
			<div style="clear: both;"></div>
		</div>	
		
		<div class="item">
			<span class="userInfoLeft"><{$lang.inner_weight}>:</span>
			<span class="userInfoRight">
				<input type="text" name="product_net_weight" id="product_net_weight" class="text ui-widget-content ui-corner-all"/>kg
			</span>
			<div style="clear: both;"></div>
		</div>	
		
		<div class="item">
			<span class="userInfoLeft"><{$lang.declar_price}>:</span>
			<span class="userInfoRight">
				<input type="text" name="product_price" id="product_price" class="text ui-widget-content ui-corner-all"/>USD
			</span>
			<div style="clear: both;"></div>
		</div>
		
		</form>
	
	</div>
</div>

<div id="package" title="<{$lang.pls}><{$lang.packaging_material}>" style="display:none;"> 
	<div class="info">
		<div class="packageTips"></div>
		
		<form id="packageForm" name="packageForm" >
		<input type="hidden" name="product_id" />
		<input type="hidden" name="ppm_id" />
		
		<div class="item">
			<span class="userInfoLeft"><{$lang.warehouse}>:</span>
			<span class="userInfoRight" id="warehouseid">
				<select type="text" class="autoGenerate" value="" name="warehouseid" style="width: 200px; display: inline;">
				</select>
			</span>
			<div style="clear:both;"></div>
		</div>		
		
		<div class="item">
			<span class="userInfoLeft"><{$lang.package}>:</span>
			<span class="userInfoRight" id="packageid">
				<select type="text" class="autoGenerate" value="" name="packageid" style="width: 200px; display: inline;">
				</select>
			</span>
			<div style="clear:both;"></div>
		</div>			
		</form>
	
	</div>
</div>

<div id="batchAdd" title="<{$lang.batch}><{$lang.add}><{$lang.product}>" style="display:none;"> 
	<div class="info">
		<div class="batchAddTips"></div>		
		<form id="uploadForm" enctype="multipart/form-data" action="/product/product/upload-file" method="post">
			<div class="  item">
				<span class="userInfoLeft"><{$lang.pls}><{$lang.file}>：</span>
				<span class="userInfoRight">
					<input type="file" name="productFile"><{$lang.support}>.xls,.csv<{$lang.file}>
				</span>
			</div>
			<div class=" item"  style="display:none;">
				<span class="userInfoLeft">&nbsp</span><span class="middle"><input type="submit" value="<{$lang.upload}>" name="sbt" id="batchAddBtn" class='button'></span>
			</div>
		</form>
	
	</div>
</div>